#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include"snake.h"

// 进行蛇吃食物的操作：蛇长增加了1，并在地图中表示出蛇头
void snake_eat(int headX, int headY) {
	map[headY][headX] = SNAKE_HEAD;
	snakeLength++;
	snakeX[snakeLength - 1] = headX;
	snakeY[snakeLength - 1] = headY;
}